package com.online.service;

import com.online.dao.CEMapper;
import com.online.entity.CEContact;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CEServiceImpl implements CEService{

    @Autowired
    CEMapper ceMapper;

    @Override
    public int addARecord(Integer examId, String className) {
        return ceMapper.insertARecord(examId,className);
    }

    @Override
    public List<Integer> showAStudentExam(String className) {
        return ceMapper.selectExamByClassName(className);
    }

    @Override
    public int deleteARecord(int examId) {
        return ceMapper.deleteARecord(examId);
    }

    @Override
    public int deleteARecordByClassName(String className) {
        return ceMapper.deleteARecordByClassName(className);
    }

    @Override
    public List<CEContact> showARecordByExamId(Integer examId) {
        return ceMapper.showARecord(examId);
    }
}
